'use strict';

const BaseService = require('./base');

class PrefixController extends BaseService {
  constructor(...props) {
    super('Prefix', ...props)
  }

  async findByPrefix(prefix) {
    const { primary_model, ctx } = this
    return await primary_model.findOne({
      where: {prefix, status: '1'}
    })
  }
}

module.exports = PrefixController;
